package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/14 14:46
 * 邮箱：648859026@qq.com
 */
public class GuideDelInteractionAction extends AHttpService<PbBean.PbResCommentDelComment> {
    /**
     * 搭配指导删除互动
     * @param context
     * @param interactionId  互动ID
     * @return
     */
    public static GuideDelInteractionAction newInstance(Context context, int interactionId){
        return new GuideDelInteractionAction(context, interactionId);
    }
    private int interactionId ;
    private GuideDelInteractionAction(Context context, int interactionId) {
        super(context);
        this.interactionId =interactionId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqCommentDelComment.Builder builder = PbBean.PbReqCommentDelComment.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setId(interactionId);

        return apiService.replyDelComment(builder.build());
    }
}
